<!DOCTYPE html>
<html>
<head>
<title>文件管理</title>
#parse("sys/header.html")
<script src="${rc.contextPath}/statics/libs/ajaxupload.js"></script>
<style type="text/css">
.form-horizontal{
	width:100%;padding-top:20px;
}
</style>
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
		<div class="row">
		   	<div class="col-sm-2 control-label">
		   		<ul id="menuTree" class="ztree"></ul>
		   	</div>
		   	<div class="col-sm-10">
		   	<div class="grid-btn">
				<div class="form-group col-sm-2">
					<input type="text" class="form-control" v-model="q.searchName" @keyup.enter="query" placeholder="文件名称">
				</div>
				<a class="btn btn-default" @click="query">查询</a>
				<a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
				<a class="btn btn-primary" @click="mkdir"><i class="fa fa-plus"></i>&nbsp;新建文件夹</a>
				<!-- <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a> -->
				<!-- <a class="btn btn-primary" @click="del('')"><i class="fa fa-trash-o"></i>&nbsp;删除</a> -->
				<a class="btn btn-primary" @click="zip"><i class="fa fa-plus"></i>&nbsp;打包</a>
				<a class="btn btn-primary" @click="zipDownload"><i class="fa fa-plus"></i>&nbsp;打包下载</a>
				<!-- <a class="btn btn-primary" @click="unzip"><i class="fa fa-plus"></i>&nbsp;解压</a> -->
				<a class="btn btn-primary"  id="upload"><i class="fa fa-plus"></i>&nbsp;上传</a>
				<a class="btn btn-primary"  id="zipUpload"><i class="fa fa-plus"></i>&nbsp;上传压缩包</a>
			</div>
		         <table id="jqGrid"></table>
<!-- 	   			 <div id="jqGridPager"></div>
 -->		    </div>
		</div>
    </div>
    
    <div v-show="!showList" class="panel panel-default">
		<div class="panel-heading">{{title}}</div>
		<div class="box box-primary">
			<form class="form-horizontal ">
			<div class="box-body">
			<div class="row">
				<div class="col-sm-12">
					<div class="form-group">
						<label class="col-sm-2 control-label">文件夹</label>
						<div class="col-sm-10">
							<p class="form-control-static">{{q.parentId}}</p>
						</div>
					</div>
				</div>
			</div>

			<div class="row">
				<div class="col-sm-12">
					<div class="form-group">
						<label class="col-sm-2 control-label">文件名</label>
						<div class="col-sm-10 form-inline">
							<input type="text"  v-model="fileinfo.baseName"  maxlength="150" style="width: 200px;" class="form-control required">
							<div class="input-group">
								<span class="input-group-addon">.</span> <select
									class="form-control" id="extension" tabindex="-1" v-model="fileinfo.extension" >
									<option>html</option>
									<option>htm</option>
									<option>js</option>
									<option>css</option>
									<option>txt</option>
									<option>xml</option>
									<option>ftl</option>
									<option>vm</option>
									<option>jsp</option>
									<option>jspx</option>
									<option>asp</option>
									<option>aspx</option>
									<option>php</option>
									<option>tld</option>
									<option>tag</option>
									<option>properties</option>
									<option>sql</option>
									<option>groovy</option>
								</select>
							</div>

						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-sm-12">
					<div class="form-group">
						<label class="col-sm-2 control-label">正文</label>
						<div class="col-sm-10">
							<textarea v-model="fileinfo.text" rows="20" spellcheck="false" class="form-control" wrap="off"></textarea>
						</div>
					</div>
				</div>
			</div>
		</div>
		
		<div class="form-group">
			<div class="col-sm-2 control-label"></div> 
			<input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
			&nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
		</div>
		</form>
	</div>
	</div>
	<div id="filename" style="display: none;">
	<div class="row">
			<div class="col-sm-12">
				<div class="form-group">
					<label class="col-sm-2 control-label">目录名称</label>
					<div class="col-sm-10 form-inline">
						<input type="text"  v-model="fileinfo.baseName"  maxlength="150" style="width: 200px;" class="form-control required">
					</div>
				</div>
			</div>
		</div>
</div>
	</div>
  
<script src="${rc.contextPath}/js/webfile/file.js?_${date.systemTime}"></script>    
</body>
</html>